package com.zxy.ziems.server.utils;

import com.zxy.btp.common.exception.ConditionException;
import com.zxy.ziems.server.constant.PointDataType;

/**
 * @ClassName QueryUtils
 * @Description
 * @Author 邓伟
 * @Date 2023/12/6 16:45
 * @Version 1.0
 */
public class QueryUtils {

    public static String getStartTime (Integer dataObtainType,String startTime) {
        return switch (dataObtainType) {
            case 0 -> startTime;
            case 1 -> startTime;
            case 2 -> startTime + " 00:00:00";
            default -> throw new ConditionException("数据类型有误");
            };
    }

    public static String getEndTime (Integer dataObtainType,String endTime) {
        return switch (dataObtainType) {
            case 0 -> endTime;
            case 1 -> endTime;
            case 2 -> endTime + " 23:59:59";
            default -> throw new ConditionException("数据类型有误");
        };
    }

}
